Component({
  data: {
    selected: 0,
    color: "#000000",
    selectedColor: "#3cc51f",
    list: [{
      pagePath: "/pages/index/index",
      iconPath: "/imgs/首页 (1).svg",
      selectedIconPath: "/imgs/首页 (1).svg",
      text: "首页"
    }, {
      pagePath: "/pages/use/use",
      iconPath: "/imgs/应用管理.svg",
      selectedIconPath: "/imgs/应用管理.svg",
      text: "应用"
    },{
      pagePath: "/pages/message/message",
      iconPath: "/imgs/消息.svg",
      selectedIconPath: "/imgs/消息.svg",
      text: "消息"
    }, {
      pagePath: "/pages/discover/discover",
      iconPath: "/imgs/发现.svg",
      selectedIconPath: "/imgs/发现.svg",
      text: "发现"
    },{
      pagePath: "/pages/myHome/myHome",
      iconPath: "/imgs/人-人员.svg",
      selectedIconPath: "/imgs/人-人员.svg",
      text: "我的"
    }]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      this.setData({
        selected: data.index
      })
    }
  }
})